<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title> - 修改信息</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="/static/admin/layui/css/layui.css" rel="stylesheet">
    <link rel="shortcut icon" href="/favicon.ico">
    <link href="/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="/static/admin/css/animate.css" rel="stylesheet">
    <link href="/static/admin/css/style.css?v=4.1.0" rel="stylesheet">

    <style>
        .table-hide-div>.info-table .info-table-line .info-table-row-name {
            text-align: right;
            font-weight: 400;
            color: #8a8a8a;
        }

        .table-hide-div>.info-table .info-table-line .info-table-row-val {
            border-right: 1px #e7eaec solid;
        }

        .table-hide-div>.info-table .info-table-line .info-table-row-val input[type=text] {
            border: 0;
            width: 100%;
            background: none;
            padding: 2px 4px;
        }

        .btn-sm {
            padding: 7px 64px;
            font-size: 15px;
            font-weight: 500;
        }

        #addlog {
            background-color: #27c8f9;
            border-color: #27c8f9;
        }

        #viewlog {
            background-color: #27c8f9;
            border-color: #27c8f9;
        }

        .zyc {
            display: none;
            margin: 10px 10px;
        }

        .zyc input {
            width: 130px;
            height: 100%;
            display: inline-block;
            font-weight: bold;
            text-align: center;
            letter-spacing: 0.3em;
        }

        .zyc textarea {
            border-color: #cfdadd;
            border-radius: 2px;
        }

        .zyc img {
            display: inline-block;
            width: 100px;
            margin-top: -4px;
            border-radius: 2px;
            border: 1px #cfdadd solid;
        }

        .zyc select {
            padding: 0px 12px;
        }

        #zycsubmit {
            display: block;
            margin-top: 10px;
            border-radius: 2px;
        }

        .btn-group {
            padding: 5px 10px;
        }

        .layui-layer-page .layui-layer-content {
            overflow: visible !important;
        }

        .select_class {
            border-color: #e0e0e0;
            color: #636363;
            font-size: smaller;
            padding-bottom: 2px;
        }

        .select_class:focus {
            border-color: #ccc;
            color: #636363;
            font-size: smaller;
        }

        .table>thead>tr>th,
        .table>tbody>tr>th,
        .table>tfoot>tr>th,
        .table>thead>tr>td,
        .table>tbody>tr>td,
        .table>tfoot>tr>td {
            padding: 3px;
        }

        table tr td:first-child {
            border-left: 1px #e7eaec solid;
        }
    </style>

</head>

<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-sm-4">
            <h2>编辑信息</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="{:url('Index/admin')}">主页</a>
                </li>
                <li>
                    <strong>编辑信息</strong>
                </li>
            </ol>
        </div>
    </div>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">

                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>修改信息</h5>
                    </div>
                    <div class="ibox-content">
                        <form class="form-horizontal ">
                            <input type="hidden" id="sd" name="sid" value="{$data.sid}">
                            <div class="ibox-content table-hide-div">
                                <table style="width: 100%;border-bottom: 1px #e7eaec solid;" class="table table-striped info-table ">
                                    <tbody>
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                姓名:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="姓名" name="sname" value="{$data.sname}">
                                            </td>
                                            <td class="info-table-row info-table-row-name" style="text-align: left;border-right: 1px #e7eaec solid;">
                                                性别:
                                                <input type="radio" name="ssex" class="ssex" {if condition="$data.ssex eq 1" } checked {/if}
                                                    value="1" />
                                                男
                                                <input type="radio" name="ssex" class="ssex" {if condition="$data.ssex eq 0" } checked {/if}
                                                    value="0" />
                                                女
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                婚否:
                                                <input type="radio" name="married" class="married" {if condition="$data.married eq 1" } checked {/if}
                                                    value="1" />
                                                是
                                                <input type="radio" name="married" class="married" {if condition="$data.married eq 0" } checked {/if}
                                                    value="0" />
                                                否
                                            </td>
                                
                                            <td class="info-table-row info-table-row-name">
                                                出生年月:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" readonly name="birthday"
                                                    value="{$data['birthday']=='0000-00-00'?' ':$data['birthday']}" id="birthday">
                                            </td>
                                        </tr>
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                咨询人姓名:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="zxr_name" value="{$data.zxr_name}">
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                咨询人电话:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                {if condition='in_array(31,$ra)'}
                                                <input type="text" placeholder="" name="zxr_tel" class="str-check" check-type='mobile'
                                                    value="{$data.zxr_tel}">
                                                {else/}
                                                {$data.zxr_tel}
                                                {/if}
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                咨询人与学生的关系:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input list="students" type="text" placeholder="" name="rapport" class="select-input"
                                                    value="{$data.rapport}">
                                                <datalist id="students">
                                                    <option value="本人">
                                                    <option value="家长/监护人">
                                                    <option value="亲戚">
                                                    <option value="朋友">
                                                </datalist>
                                            </td>
                                        </tr>
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                学生联系方式:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                {if condition='in_array(310,$ra)'}
                                                <input type="text" placeholder="" class="str-check" check-type='mobile' name="stel"
                                                    value="{$data.stel}">
                                                {else/}
                                                {$data.stel}
                                                {/if}
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                微信/QQ:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="wechatqq" value="{$data.wechatqq}">
                                            </td>
                                
                                            <td class="info-table-row info-table-row-name">
                                                邮箱:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="semai" class="str-check" check-type='email'
                                                    value="{$data.semai}">
                                            </td>
                                        </tr>
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                籍贯:
                                            </td>
                                            <td colspan="2" class="info-table-row info-table-row-val">
                                                <select id="s_province" name="province" class="changeaddress select_class"></select>&nbsp;&nbsp;
                                                <select id="s_city" name="city" class="changeaddress select_class"></select>&nbsp;&nbsp;
                                                <select id="s_county" name="county" class="changeaddress select_class"></select>
                                            </td>
                                        
                                            <td class="info-table-row info-table-row-name">
                                                详细地址:
                                            </td>
                                            <td colspan="2" class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="sadd" value="{$data.sadd}">
                                            </td>
                                        </tr>
                                        <!-- 防火线 -->
                                        <tr colspan='10' class="info-table-line" style="background-color:#fff;">
                                            <td colspan='6' style="height: 40px;border-left: unset;">
                                        
                                            </td>
                                        </tr>
                                        <!-- 防火线 -->
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                在读学校:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="current_school" value="{$data.current_school}">
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                在读年级:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <select name="current_grade" class="select_class" value='{$data.current_grade}' >
                                                    <option value="">请选择</option>
                                                    <option value="小学">小学</option>
                                                    <option value="初中">初中</option>
                                                    <option value="大学">大学</option>
                                                    <option value="硕士">硕士</option>
                                                    <option value="博士">博士</option>
                                                </select>
                                                <!-- <input type="text" placeholder="" name="current_grade" value="{$data.current_grade}"> -->
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                所学专业:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="degree" value="{$data.degree}">
                                            </td>
                                        </tr>
                                
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                文化程度:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <!-- <input type="text" placeholder="" name="education"  value="{$data.education}"> -->
                                                <select name="education" class="select_class">
                                                    {volist name="education_select" id="vo"}
                                                    <option value="{$vo.id}" {if condition="$vo.id == $data.education" } selected {/if}>{$vo.name}
                                                        </option> {/volist} {if condition="$data.education==-1 or $data.education==null" } <option
                                                        value="-1" selected>请选择
                                                    </option>
                                                    {/if}
                                                </select>
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                毕业学校:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="graduation_school" value="{$data.graduation_school}">
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                毕业时间:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="graduation_time"
                                                    value="{$data['graduation_time']=='0000-00-00'?' ':$data['graduation_time']}" id="graduation_time">
                                            </td>
                                
                                        </tr>
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                高考英语成绩:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="english_scores" value="{$data.english_scores}">
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                外语水平:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="english_Level" value="{$data.english_Level}">
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                是否参加雅思考试:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="radio" name="ielts_test" class="ielts_test" value="1" />
                                                是
                                                <input type="radio" name="ielts_test" class="ielts_test" checked value="0" />
                                                否
                                                <input type="number" style="display: none;" placeholder="分数" name="ielts_scores" id="ielts_scores" value="{$data.ielts_scores}">
                                            </td>
                                
                                        </tr>
                                
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                留学国家:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="study_abroad_country" value="{$data.study_abroad_country}">
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                留学城市:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="study_abroad_city" value="{$data.study_abroad_city}">
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                目标学历:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="target_education" value="{$data.target_education}">
                                            </td>
                                        </tr>
                                
                                        <!-- 防火线 -->
                                        <tr colspan='10' class="info-table-line">
                                            <td colspan='6' style="height: 40px;border-left: unset;">
                                
                                            </td>
                                        </tr>
                                        <!-- 防火线 -->
                                
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                学生状态:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                {if condition='$data.sstatus == 1'}
                                                    已签约 不可修改
                                                {else/}
                                                    {if condition='in_array(32,$ra)'}
                                                        <select id="sstatus" name="sstatus" value="{$data.sstatus}" class="sstatus select_class">
                                                            {foreach $status_config as $status}
                                                            {if condition='$status.id != 1'}
                                                            <option value="{$status.id}">{$status.name}</option>
                                                            {/if}
                                                            {/foreach}
                                                        </select>
                                                    {else/}
                                                        {$status_config[$data.sstatus]['name']}
                                                    {/if}
                                                {/if}
                                                
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                签约率:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                {if condition='in_array(39,$ra)'}
                                                <select name="contract_rate" class="select_class">
                                                    <option value="-1" selected>请选择</option>
                                                    {volist name="contract_rate_select" id="vo"}
                                                    <option value="{$vo.id}" {if condition="$vo.id == $data.contract_rate" } selected {/if}> {$vo.name}</option>
                                                    {/volist} 
                                                </select>
                                                {else/}
                                                    {$contract_rate_select[$data.contract_rate]['name']}
                                                {/if}
                                            </td>
                                
                                            <td class="info-table-row info-table-row-name">
                                                当前进度:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="schedule" value="{$data.schedule}">
                                            </td>
                                        </tr>
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                信息来源:
                                            </td>
                                            <td colspan='' class="info-table-row info-table-row-val">
                                                {if condition='in_array(33,$ra)'}
                                                <select id="infosource" value="" name="infosource" class="select_class">
                                                    <option value="">-请选择-</option>
                                                    <option value="网络搜索">网络搜索</option>
                                                    <option value="网代介绍">网代介绍</option>
                                                    <option value="朋友介绍">朋友介绍</option>
                                                    <option value="内部转介">内部转介</option>
                                                    <option value="报纸广告">报纸广告</option>
                                                    <option value="展会活动">展会活动</option>
                                                    <option value="地推传单">地推传单</option>
                                                    <option value="在线客服">在线客服</option>
                                                    <option value="渠道合作">渠道合作</option>
                                                    <option value="室外广告">室外广告</option>
                                                    <option value="校园宣传">校园宣传</option>
                                                    <option value="项目渠道">项目渠道</option>
                                                    <option value="雅思考点">雅思考点</option>
                                                    <option value="托福考点">托福考点</option>
                                                    <option value="线上推广">线上推广</option>
                                                    <option value="其他">其他</option>
                                                </select>
                                                {else/}
                                                {$data.infosource}
                                                {/if}
                                            </td>
                                
                                            <td class="info-table-row info-table-row-name">
                                                来源明细:
                                            </td>
                                            <td colspan='' class="info-table-row info-table-row-val">
                                                {if condition='in_array(34,$ra)'}
                                                <input type="text" placeholder="" name="source_details" value="{$data.source_details}">
                                                {else/}
                                                {$data.source_details}
                                                {/if}
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                介绍给中介:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                {if condition='in_array(35,$ra)'}
                                                <input type="text" placeholder="" name="agent" value="{$data.agent}">
                                                {else/}
                                                {$data.agent}
                                                {/if}
                                            </td>
                                        </tr>
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                咨询课程:
                                            </td>
                                            <td colspan='' class="info-table-row info-table-row-val">
                                                {if condition='in_array(36,$ra)'}
                                                <select id="zx_course" name="zx_course" class="select_class">
                                                    <option value="">-请选择-</option>
                                                    {foreach $zx_course_select as $zx_course}
                                                    <option value="{$zx_course['name']}">{$zx_course['name']}</option>
                                                    {/foreach}
                                                </select>
                                                {else/}
                                                {$data.zx_course}
                                                {/if}
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                咨询形式:
                                            </td>
                                            <td colspan='' class="info-table-row info-table-row-val">
                                                
                                                {if condition='in_array(37,$ra)'}
                                                <select id="zx_form" name="zx_form" class="select_class">
                                                    <option value="">-请选择-</option>
                                                    <option value="来电">来电</option>
                                                    <option value="来访">来访</option>
                                                    <option value="网络">网络</option>
                                                    <option value="老学员介绍">老学员介绍</option>
                                                    <option value="其他">其他</option>
                                                </select>
                                                {else/}
                                                {$data.zx_form}
                                                {/if}
                                            </td>
                                            <td class="info-table-row info-table-row-name">
                                                下次回访时间:
                                            </td>
                                            <td class="info-table-row info-table-row-val">
                                                {if condition='in_array(38,$ra)'}
                                                <input type="text" placeholder="" readonly name="returnvisit_time"
                                                    value="{$data['returnvisit_time']=='0000-00-00'?' ':$data['returnvisit_time']}"
                                                    id="returnvisit_time">
                                                {else/}
                                                {$data.returnvisit_time}
                                                {/if}
                                            </td>
                                
                                        </tr>
                                
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                备注信息:
                                            </td>
                                            <td colspan="10" class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="remarks" value="{$data.remarks}">
                                            </td>
                                        </tr>
                                       
                                        <tr colspan='10' class="info-table-line">
                                            <td class="info-table-row info-table-row-name">
                                                咨询日志:
                                            </td>
                                            <td colspan="10" class="info-table-row info-table-row-val">
                                                <input type="text" placeholder="" name="logtext" value="">
                                            </td>
                                        </tr>
                                
                                    </tbody>
                                </table>

                            </div>
                            <div class="form-group ">
                                <div class="col-sm-offset-2 col-sm-6">
                                    <button class="btn btn-sm btn-info btn-group" type="button" id="adds">保 存</button>
                                    <!-- <button class="btn btn-sm btn-info btn-group" type="button"
                                        id="addlog">添加咨询日志</button> -->
                                    <button class="btn btn-sm btn-info btn-group" type="button"
                                        id="viewlog">查看日志</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 转回资源池 -->
    <div class="zyc" id="zyc">
        <h4>添加咨询日志</h4>
        <textarea style="width: 100%;height: 100px;" id="logtext" class="str-check" rows="4" cols=""
            placeholder="请填写日志内容" autocomplete="off"></textarea><br>
        <!-- <input type="text" class="form-control" name="yzm" id="yzmstr" placeholder="请输入验证码" autocomplete="off">
            <img id='yzmImg' onclick="this.src='{:captcha_src()}?'+Math.random()" src="{:captcha_src()}" alt="captcha" /> -->
        <a href="javascript:;" id='zycsubmit' data-id='' class="btn btn-primary">确认添加</a>
    </div>


    <!-- 全局js -->
    <script src="/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/static/admin/js/bootstrap.min.js?v=3.3.6"></script>

    <!-- 自定义js -->
    <script src="/static/admin/js/content.js?v=1.0.0"></script>
    <script src="/static/admin/layui/layui.js"></script>
    <!-- 省市县三级联动 -->
    <script src="/static/admin/js/plugins/cityselect/area_data.js"></script>
    <script src="/static/admin/js/plugins/cityselect/jquery.city.select.js"></script>

    <script>
        //插件调用代码
        $(function () {
            $('.ielts_test').change(function () {
                let val = $(this).val();
                if(val == 1) {
                    $('#ielts_scores').show();
                } else {
                    $('#ielts_scores').hide();
                }
            });
            //初始化 select
            $('#zx_form option[value="{$data.zx_form}"]').attr('selected','selected'); //咨询形式
            $('#sstatus option[value="{$data.sstatus}"]').attr('selected','selected'); //咨询状态
            $('#zx_course option[value="{$data.zx_course}"]').attr('selected', 'selected'); //咨询课程
            $('#infosource option[value="{$data.infosource}"]').attr('selected', 'selected'); //信息来源
            $('#student_class option[value="{$data.student_class}"]').attr('selected', 'selected'); //学社类型
            $("input[name=ielts_test][value={$data.ielts_test}]").attr('checked', 'checked').change(); //学社类型


            $('#s_province, #s_city, #s_county').citylist({
                data: area_data,
                children: ['citys', 'areas'],
                selected: ["{$data.province}", '{$data.city}', '{$data.county}']  // 赋初值 省 市 县
            });
        });


        layui.use(['layer', 'laydate'], function () { //独立版的layer无需执行这一句
            var $ = layui.jquery, layer = layui.layer, laydate = layui.laydate //独立版的layer无需执行这一句
            //点击提交
            $("#adds").click(function () {
                var re = strCheck.checkForm({ elem: 'form' });
                if (!re) return;
                $.post("{:url('Student/sav')}", $("form").serialize(), function (res) {
                    layer.msg(res.msg);
                    if (res.code == 1) {
                        window.history.go(-1);
                    }
                })
            });


            laydate.render({  //下次回访时间
                elem: '#returnvisit_time',
                event: 'focus',  //获得焦点是触发
            });
            laydate.render({  //生日
                elem: '#birthday ',
                event: 'focus',  //获得焦点是触发
            });
            laydate.render({  //毕业时间
                elem: '#graduation_time ',
                event: 'focus',  //获得焦点是触发

            });


            $('.str-check').blur(function () {
                strCheck.check({
                    elem: $(this),
                });

            });

            //点击查看日志
            $("#viewlog").click(function () {
                var url = "{:url('Logsystem/index')}?id=" + "{$data['sid']}";
                layer.open({
                    title: '日志',
                    type: 2,
                    area: ['800px', '600px'],
                    content: url
                });
            });

            //弹出添加日志窗口
            $('#addlog').on('click', function () {
                layer.open({
                    type: 1,
                    title: false,
                    shade: false,
                    offset: '100px',
                    area: ['300px', 'auto'],
                    content: $('#zyc')
                });
                // $('#zycsubmit').attr('data-id',resid);
            });

            $('#zycsubmit').on('click', function () { //验证码验证
                var str = $('#zyc #yzmstr').val();
                var resid = "{$data.sid}";//资源id
                var logtext = $('#zyc #logtext').val();//
                var data = { resid: resid, logtext: logtext };
                if (!strCheck.checkEmpty({ elem: '#zyc' })) return false;
                addLogs(data); //添加日志
                // $.ajax({
                //     url:"{:url('Counselors/checkyzm')}",
                //     type: 'post',
                //     data: {code:str},
                //     success: function(re){
                //         if(re.code){
                //             layer.msg(re.msg,{icon:1,time:2000,offset :'100px',});
                //             addLogs(data); //添加日志
                //         }else{
                //             layer.msg(re.msg,{icon:5,time:2000,offset :'100px',});
                //         }
                //         //刷新验证码
                //         $('#zyc #yzmImg').attr('src','{:captcha_src()}?'+Math.random());

                //     },
                //     error:function(re){
                //         console.log(re.msg);
                //     }
                // });
            });

            

            $('.changeaddress').on('change', function () {
                var s_province = $('#s_province').val(); //省
                var s_city = $('#s_city').val(); //市
                var s_county = $('#s_county').val(); //县区
                var jsonstr = JSON.stringify({
                    s_province: s_province,
                    s_city: s_city,
                    s_county: s_county
                });
                $("#birthplace").val(jsonstr);
            });

            function addLogs(data) {  //添加数据
                $.ajax({
                    url: "{:url('Logsystem/addzxlog')}",
                    type: 'post',
                    data: data,
                    success: function (re) {
                        layer.closeAll();
                        if (re.code) {
                            layer.msg(re.msg, { icon: 1, offset: '100px', });
                            $('#zyc #logtext, #zyc #yzmstr').val('');//清空文本内容
                            // window.location.reload();
                        } else {
                            layer.msg(re.msg, { icon: 1, offset: '100px', });
                        }

                    },
                    error: function (re) {
                        console.log(re.msg);
                    }
                });
            }




        });

    </script>



</body>

</html>